from base.base import Base
import page

class PageAddPD(Base):
    # 点击产品
    def page_pd_click(self):
        self.base_click(page.pd_click)

    # 点击添加产品
    def page_add_pd_click(self):
        self.base_click(page.add_pd_click)

    # 输入产品名称
    
    def page_pd_name_type(self):
        self.base_input(page.pd_name_type,"selenium")

    # 输入产品编号

    def page_pd_name_code(self):
        self.base_input(page.pd_name_code,123)

    
    # 输入产品描述
    def page_pd_desc_type(self):
        self.base_switch_to_iframe(page.pd_desc_iframe)
        self.base_input(page.pd_desc_type,"name")
        


    # 组装业务方法
    def add_pd(self):
        self.page_pd_click()
        self.page_add_pd_click()
        self.page_pd_name_type()
        # self.page_pd_name_code()
        self.page_pd_desc_type()
        # self.page_pd_name_code()
